Conditional Text

Conditional Text (also known as Dynamic Text) describes any text that is tailored according to the survey respondent's answer to a previous question. Conditional Text may be used in question text, or in the answer code labels. The format for specifying conditional text depends on the object type of the source question.

Where the source question is single response:

@Q1_CurrentLabel displays the associated answer code label for Q1

@Q1 displays the answer code number for Q1

@Q1_verbatim displays the text associated with an 'other specify' response to Q1

Where the source question is multiple response:

@Q1_98_verbatim displays the text associated with an 'other specify' response to Q1 (where the 'other' code number is 98)

Where the source question is a single verbatim:

@Q1 displays the text entered into Q1

Where the source question is a multiple verbatim:

@Q1_1 displays the text entered into the first verbatim field in Q1

Where the source question is in a loop:

@Q1_CurrentLabel displays the associated answer code label for the current iteration or Q1 (where Q1 is the Multi Response loop driver)

Things To Consider

The placement of questions requiring conditional text is critical. The conditional text source question must precede the question requiring the display of the conditional text, and both questions must not be contained in the same page group.

For loops, conditional text may only be used to display the value or label associated with the current loop iteration of the loop driver question; conditional text involving other questions within a loop is not possible using Survey Shaper at this point in time.

Tip: If you experience difficulty in specifying the conditional text source question, it may be helpful to complete a survey and then download the data to see exactly how the variable is named in the data file. See also: Data Structure Guide.